/**
 * 
 */
package multimedia.model;

import java.util.Vector;

import multimedia.model.colorspace.ColorspaceInterface;

/**
 * @author trigueros
 *
 */
public class DCT
{
    private ImageCell imageCell;
    
    public DCT( ImageCell currentCell )
    {
        imageCell = currentCell;
    }
    
    public ImageCell applyDCT()
    {
        PixelCoordinate frequencyMap = new PixelCoordinate( new Vector<ColorspaceInterface>(), 8);
        PixelCoordinate pixMap = new PixelCoordinate(imageCell.getPixMap(), 8);
        
        for( int u = 0; u < 8; u++ )
            for( int v = 0; v < 8; v++ )
            {
                float dctCoeff = C(u)*C(v);
//                float sample = pixMap.getPixelAt(x, y).getFirstComponent();
//                currentPixel.setSecondComponent(0.0f);
//                currentPixel.setThirdComponent(0.0f);
                
//                frequencyMap.setPixelAt(x, y, )
            }
        
        return null;
        
    }

    private float C( int x )
    {
        return (float) (( x == 0) ? 1/Math.sqrt(2) : 1);
    }
    
    
}
